﻿<Window x:Class="PotatoSoft.VisualOctStudio.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
        xmlns:local="clr-namespace:PotatoSoft.ViewModel;assembly=PotatoSoft.ViewModel"
        xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"       
        xmlns:test="clr-namespace:PotatoSoft.CustomControl;assembly=PotatoSoft.CustomControl"
        Title="Visual OCT Studio" Height="350" Width="525" WindowState="Maximized" Icon="/VisualOctStudio;component/Images/icona.png">
    <Window.DataContext>
        <Binding Path="Main" Source="{StaticResource Locator}"></Binding>
    </Window.DataContext>
    <Window.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary 
                  Source="Resources\Dictionary.xaml">
            </ResourceDictionary>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
    </Window.Resources>
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="ContentRendered">
            <GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding MainWindowRendered, Mode=Default}">
            </GalaSoft_MvvmLight_Command:EventToCommand>
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <Grid Name="root">
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
            <RowDefinition Height="20"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Menu Style="{StaticResource menu}" IsMainMenu="True" MaxHeight="20" VerticalAlignment="Top">
            <MenuItem Header="File" >
                <MenuItem Header="New"  Style="{StaticResource menuitem}"/>
            </MenuItem>
            <MenuItem Header="Edit"></MenuItem>
            <MenuItem Header="View">

                <MenuItem Header="Project Explorer" x:Name="ShopPE"   Style="{StaticResource menuitem}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding ShowProjectExplorer}"></GalaSoft_MvvmLight_Command:EventToCommand>
                        </i:EventTrigger>
                    </i:Interaction.Triggers> 
                </MenuItem>
            </MenuItem>
        </Menu>
        <WrapPanel Grid.Row="1" Background="{DynamicResource jasny}"></WrapPanel>

        <ad:DockingManager x:Name="dock" Grid.Row="2"   >
            <ad:ResizingPanel Orientation="Vertical">
                <ad:ResizingPanel Orientation="Horizontal">
                    <ad:DockablePane  ad:ResizingPanel.ResizeWidth="200" >
                        <ad:DockableContent Title="Project Explorer"  Visibility="{Binding ProjectExpVisibility,Mode=TwoWay}" Style="{DynamicResource DockableContentTabItemStyle}" Foreground="White" DataContext="{Binding}" Padding="2" Icon="/VisualOctStudio;component/Images/ps.png" >
                            <test:ProjectExplorer/>
                        </ad:DockableContent>
                        <ad:DockableContent Title="Solution Explorer" Style="{StaticResource DockableContentTabItemStyle}">

                        </ad:DockableContent>

                    </ad:DockablePane >
                    <ad:DocumentPane Name="dokument">
                        <ad:DockableContent Title="TestDocument1"/>
                        <ad:DockableContent  Title="TestDocument2"/>
                        <ad:DockableContent  Title="TestDocument3"/>
                    </ad:DocumentPane>

                </ad:ResizingPanel>
                <ad:DockablePane   ad:ResizingPanel.ResizeHeight="100">
                    <ad:DockableContent Title="Output" >
                        <test:OutputControl x:Name="test"></test:OutputControl>
                    </ad:DockableContent>

                </ad:DockablePane>

            </ad:ResizingPanel>
        </ad:DockingManager>
    </Grid>
</Window>
